package com.atguigu.security.custom;

public class LoginUserInfoHelper {
    private static ThreadLocal<Long> userId=new ThreadLocal<>();
    private static ThreadLocal<String> username=new ThreadLocal<>();

    public static void setUserId(Long _userId){
        userId.set(_userId);
    }
    public static Long getUserId(){
        return userId.get();
    }
    public static void removeUserId(){
       userId.remove();
    }
    public static void setUserName(String _userName){
        username.set(_userName);
    }
    public static String getUserName(){
       return username.get();
    }
    public static void removeUsername(){
        username.remove();
    }
}
